package com.demo.web;

import com.demo.web.vo.Person;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.client.RestTemplate;

import java.util.ArrayList;
import java.util.List;

@SpringBootApplication
@EnableDiscoveryClient
public class DemoWebApplication {
		private Logger logger = LoggerFactory.getLogger(this.getClass());

		@Bean
		@LoadBalanced
		public RestTemplate restTemplate(){
			return new RestTemplate();
		}
		public static void main(String[] args) {
			SpringApplication app = new SpringApplication(DemoWebApplication.class);
			app.setBannerMode(Banner.Mode.CONSOLE);
			app.run(args);

		}
	}
